home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wtek0693.zip
/
OOPALLEY.ZIP
/
XARRAY.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-27
|
603b
|
28 lines
// Test class arrayob
#include "point.h"
#include "rect.h"
#include "arrayob.h"
main()
{
cout << "\nTest class ArrayOb\n";
Point A(1,2);
Point B(3,4);
Rectangle a(0,0,10,10);
Rectangle b(1,2,1,2);
ArrayOb v(10);
ArrayOb t(2),u(2);
v[0] = &a;
v[1] = &A;
v[2] = new Point(0,1);
cout << v << "\n";
t[0] = &a; t[1] = &A;
u = t;
cout << "t = " << t << "\n";
cout << "t == u: " << (t==u) << "\n";
cout << "t isEqual u: " << t.isEqual(u) << "\n";
cout << "t isEqual v: " << t.isEqual(v) << "\n";
return 0;
}